PDF Plugin for Xojo

PDFDocument.ResolveFont Event

This event is called if you have font encoding set to automatic and the internal handler does not think it has good font in the stock-fonts to handle the given text.

ResolveFont(
   text as String,
   detectedLanguageScript as EinhugurPDFWriter.PDFDocument.LanguageScript,
   currentFont as EinhugurPDFWriter.Font) as EinhugurPDFWriter.Font

Parameters

text
The text that the class is trying to find good font to display.
detectedLanguageScript
Detected language script. The PDFDocument class has analysed the text and determined this language script to be best match.
currentFont
The current font in use.

Returns

EinhugurPDFWriter.Font
Return a font substitution or nil if you don't have any.

Remarks

Note that this event also fires before internal decision is made on oriental languages such as Japanese, Chinese and Korean, so you can also use the event to substitute those languages with TrueType font if you want, even if built in PDF fonts can support those languages.

Substituting on those languages is not bad idea as some Linux PDF viewers do not have built in fonts to support those languages.

See Also

PDFDocument Class